<div class="row">
  <div class="col-md-8">
    <h4>Cadastro de álbuns</h4>

    <% if can? :create, WebAdmin::Album %>
      <div class="row">
        <div class="col-md-12"><%= link_to 'Novo', new_album_path, class: 'btn btn-primary link-new' %></div>
      </div>
    <% end %>

    <div class="table-responsive">
      <table class="table table-hover">
        <thead>
          <tr>
            <td>Título</td>
            <td>Data</td>
            <td>Local</td>
            <td>Criado em</td>
          </tr>
        </thead>

        <tbody>
          <% @albums.each do |album| %>
            <tr>
              <td><%= link_to album.title, edit_album_path(album) %></td>
              <td><%= I18n.l album.date %></td>
              <td><%= album.local %></td>
              <td><%= I18n.l album.created_at, format: :only_date %></td>
            </tr>
          <% end %>
        </tbody>
      </table>
    </div>
  </div>

  <div class="col-md-4 box">
    <h4>Pesquisa</h4>
  </div>
</div>
